<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue中的条件渲染</title>
    <script src="../../vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-if="show === 0">hello</div> <!-- if, elseif else的使用必须是紧挨在一起的,否则报错 -->
        <div v-else-if="show === 1">hehe</div>
        <div v-else>bey</div>
    </div>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                show: 0
            }
        })
    </script>
</body>

</html>